package com.coinland.study.contract;

import com.coinland.study.base.BaseView;
import com.coinland.study.bean.BaseObjectBean;
import com.coinland.study.bean.LoginBean;
import com.uber.autodispose.AutoDisposeConverter;

import io.reactivex.Flowable;

/**
 * 类描述:
 * 创建人:  shenZ
 * 创建时间: 2019/8/22
 * 联系方式: 252079249@qq.com
 * 修改时间: 2019/8/22
 */
public interface LoginContract {

    interface Model{
        Flowable<BaseObjectBean<LoginBean>> login(String username, String password);

    }

    interface View  extends BaseView {

        @Override
        void showLoading();

        @Override
        void hideLoading();

        @Override
        void onError(Throwable throwable);

        void onSuccess(BaseObjectBean<LoginBean> bean);

        @Override
        <T> AutoDisposeConverter<T> bindAutoDispose();
    }

    interface Presenter{
        /**
         * 登陆
         *
         * @param username
         * @param password
         */
        void login(String username, String password);

    }
}
